import request from '@/utils/request'

// 查询补料列表
export function listFeed(query) {
  return request({
    url: '/pull/feed/list',
    method: 'get',
    params: query
  })
}

// 查询补料详细
export function getFeed(feedId) {
  return request({
    url: '/pull/feed/' + feedId,
    method: 'get'
  })
}

// 查询工位树
export function getTree(shopType) {
  return request({
    url: '/base/shop/getTreeFindType/' + shopType,
    method: 'get'
  })
}

// 新增补料
export function addFeed(data) {
  return request({
    url: '/pull/feed',
    method: 'post',
    data: data
  })
}

// 修改补料
export function updateFeed(data) {
  return request({
    url: '/pull/feed',
    method: 'put',
    data: data
  })
}

// 删除补料
export function delFeed(feedId) {
  return request({
    url: '/pull/feed/' + feedId,
    method: 'delete'
  })
}

// 导出补料
export function exportFeed(query) {
  return request({
    url: '/prod/plan/export',
    method: 'get',
    params: query
  })
}
